@media only screen and (max-width: 768px) {

    /* For mobile phones: */
    .container-head-title {
        margin-top: 4rem;
    }

    .p1.h-5, .t-smaller.h-4{
	height:auto!important;
    }


    .members,
    .members-maire {
        height: 60vw !important;
    }


    #block-contactside,
    #block-eservices-2,
    #block-lireplus-2,
    #block-newsletterblockside {
        font-size: 14px !important;
        margin-bottom: 1rem !important;
    }

    .m-heading {
        box-shadow: 0rem -0.5rem 3rem 1rem #6c757d29;
        padding-bottom: 1rem;
    }

    .m-size-h {
        font-size: 14px !important;
    }

    .m-size-btn {
        font-size: 12px !important;
    }

    .actuImg {
        height: 50vw !important;
    }

    .projImg {
        height: 50vw !important;
    }

    #commune {
        margin: 0rem !important;
    }

    .eservice-text {
        border: none !important;
    }

    .docmobile {
        display: flex;
        flex-direction: column;
    }

    .docmobile>.datebar {
        max-width: 100% !important;
        padding-top: 0rem !important;
    }

    .docmobile>.col-10 {
        max-width: 100% !important;
        margin: 0rem !important;
    }

    #main-text {
        padding: 1rem 1.5rem 1rem 1.5rem !important;
    }

    #commune-text>h3 {
        padding-left: 0rem !important;
        text-align: center !important;
    }

    #commune-text>div {
        padding-left: 0rem !important;
    }

    .header,
    .header-projets,
    .header-services,
    .header-maire,
    .header-infrastructure,
    .header-depotoir,
    .header-parti,
    .header-actualite,
    .header-securite {
        height: auto !important;
        padding: 1.5rem !important;
    }

    .m-over {
        margin-top: 0rem !important;
    }

    .align-right {
        float: none !important;
    }

    .small-pic {
        width: 100% !important;
        height: auto !important;
    }

    .header.mb-5,
    .header-projets.mb-5,
    .header-services.mb-5,
    .header-maire.mb-5,
    .header-infrastructure.mb-5,
    .header-depotoir.mb-5,
    /*.header-parti.mb-5,*/
    .header-actualite.mb-5,
    .header-securite.mb-5 {
        margin-bottom: 0rem !important;
    }

    .border-lft>h1.text-montserrat-x-bold {
        font-size: 1.2rem !important;
    }

    h3.text-montserrat-x-bold {
        font-size: .9rem !important;
    }

    .border-lft>p {
        font-size: 0.9rem !important;
    }

    .view-participation>.view-header>.header.mb-5 {
        margin-bottom: 2rem !important;
    }

    .navbar-collapse {
        border: 1px solid gainsboro;
        border-radius: 2%;
    }

    .navbar-light {
        border-bottom: 2px solid gainsboro;
    }

    /* Effet de flou pour le contenu de la page */
    .page-content {
        transition: filter 0.3s ease-in-out;
    }

    .page-blur {
        filter: blur(5px);
        pointer-events: none;
    }

    .page-content,
    main,
    footer {
        transition: filter 0.3s ease-in-out;
    }

    .page-blur {
        filter: blur(5px);
        pointer-events: none;
    }

    .navbar {
        z-index: 1050;
    }

    .navbar-collapse {
        filter: none !important;
    }


    .mt-5 {
        margin-top: 4rem !important;
    }

    #edit-submit {
        margin: 0rem !important;
        margin-top: .2rem !important;
    }

    .calendar-view-table {
        padding: 0rem 1.5rem!important;
    }
    
    .calendar-view-pager{
        flex-direction: row!important;
    }

    .calendar-view-pager .pager__item a{
        display: inline-flex!important;
        font-family: 'Montserrat', sans-serif!important;
    }

    .mobile-hidden {
        display: none !important;
    }
}


/** Calendar **/

/* ==============================================
   STYLES MODERNES POUR FULLCALENDAR DRUPAL
   ============================================== */

/* Variables CSS pour une cohérence des couleurs */
:root {
    --primary-color: #2564A9;
    --primary-dark: #2564A9;
    --secondary-color: #2564A1;
    --accent-color: #f093fb;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container principal */
.js-drupal-fullcalendar {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    transition: var(--transition);
    padding: 0rem 1.5rem!important;
}

.js-drupal-fullcalendar:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Toolbar moderne */
.fc-toolbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1.5rem 2rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.fc-toolbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.fc-toolbar > * {
    position: relative;
    z-index: 1;
}

/* Titre du calendrier */
.fc-toolbar h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -0.025em;
}

/* Groupes de boutons */
.fc-button-group {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--white);
}

/* Styles des boutons */
.fc-button {
    border: none !important;
    background: var(--white) !important;
    color: var(--gray-700) !important;
    padding: 0.75rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: var(--transition) !important;
    position: relative;
    overflow: hidden;
}

.fc-button:hover {
    background: var(--gray-50) !important;
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.fc-button:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
    outline: none !important;
}

.fc-button-active {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    font-weight: 700 !important;
}

.fc-button-active:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

/* Bouton Today avec style spécial */
.fc-today-button {
    background: var(--success-color) !important;
    color: var(--white) !important;
    border-radius: var(--border-radius-sm) !important;
    margin: 0 1rem !important;
    box-shadow: var(--shadow-md);
}

.fc-today-button:hover {
    /* background: #2564A9 !important; */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.fc-today-button:disabled {
    background: var(--gray-300) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
    transform: none;
}

/* Navigation arrows */
.fc-prev-button, .fc-next-button {
    background: rgba(255,255,255,0.9) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0.25rem !important;
}

.fc-prev-button:hover, .fc-next-button:hover {
    background: var(--white) !important;
    transform: scale(1.1);
}

/* Container de la vue */
.fc-view-container {
    background: var(--white);
    padding: 0;
}

/* Grille du calendrier */
.fc-dayGrid-view {
    border: none;
}

/* Headers des jours */
.fc-day-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-700);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.5rem;
    border: none;
    position: relative;
}

.fc-day-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Cellules des jours */
.fc-day {
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    position: relative;
    min-height: 120px;
}

.fc-day:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
}

/* Jour aujourd'hui */
.fc-today {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.1) 100%) !important;
    border: 2px solid !important;
    border-color: var(--primary-color) !important;
    position: relative;
}

.fc-today::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Numéros des jours */
.fc-day-number {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: inline-block;
    min-width: 2rem;
    text-align: center;
    text-decoration: none;
    margin: 0.5rem;
}

.fc-day-number:hover {
    background: var(--primary-color)!important;
    color: var(--white)!important;
    transform: scale(1.1);
    text-decoration: none;
}

/* Jour aujourd'hui - numéro */
.fc-today .fc-day-number {
    background: var(--white) !important;
    color: var(--primary-color) !important;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

/* Jours du mois précédent/suivant */
.fc-other-month .fc-day-number {
    color: var(--gray-400);
    opacity: 0.6;
}

/* Événements */
.fc-event {
    border: none !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0.25rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition) !important;
    position: relative;
    overflow: hidden;
}

.fc-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255,255,255,0.3);
}

.fc-event:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg) !important;
    z-index: 10;
}

/* Événement exemple avec style personnalisé */
.fc-event[style*="#3a87ad"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: var(--white) !important;
}

/* Contenu de l'événement */
.fc-event .fc-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fc-event .fc-time {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

.fc-event .fc-title {
    font-weight: 700;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .fc-toolbar .fc-left,
    .fc-toolbar .fc-center,
    .fc-toolbar .fc-right {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .fc-toolbar h2 {
        font-size: 1.5rem;
    }
    
    .fc-button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    .fc-day {
        min-height: 80px;
    }
    
    .js-drupal-fullcalendar {
        margin: 1rem 0;
        border-radius: var(--border-radius-sm);
    }
}

@media (max-width: 480px) {
    .fc-toolbar {
        padding: 1rem;
    }
    
    .fc-day-header {
        font-size: 0.75rem;
        padding: 0.75rem 0.25rem;
    }
    
    .fc-day {
        min-height: 60px;
    }
    
    .fc-event {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Animations d'entrée */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fc-day-grid {
    animation: slideInUp 0.6s ease-out;
}

.fc-event {
    animation: fadeIn 0.4s ease-out;
}


/* Styles supplémentaires pour améliorer l'accessibilité */
.fc-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.fc-day-number:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Indicateurs visuels pour les jours avec événements */
.fc-day.fc-has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
}

/* .fc-content-skeleton td{
    background: lightsteelblue!important;
} */

.fc-content-skeleton td a{
    background: var(--white) !important;
}
