/* ===== Styles généraux ===== */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #eef5f7;
    color: #333;
}


h3{
border-left:4px solid #3b8f98;
padding-left:8px;
}







/* ===== Effet zoom sur les images des liens ===== */

.car-item img{
    transition: transform 0.3s ease;
}

.car-item:hover img{
    transform: scale(1.15);
}

.car-item{
    overflow:hidden;
}




a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* ===== Carrousel ===== */
.photo-header {
  position: relative;
  overflow: hidden;
}

.photo-track {
    display: flex;
    width: 200%;
    animation: scroll 60s linear infinite;
}

.photo-track img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: inline-block;
}

/* ===== Carrousel texte optimisé ===== */
.carousel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  background: rgba(0,0,0,0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column; /* empile verticalement */
  gap: 0.2rem;
  transition: transform 0.3s ease;
  max-width: 90%;
  white-space: normal; /* texte peut revenir à la ligne */
}

.carousel-text:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Ligne 1 – plus petite, lisible */
.carousel-text .line1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 600;
  display: block;
  width: 100%;
}

/* Ligne 2 – grande, responsive */
.carousel-text .line2 {
  font-family: 'Bradley Hand ITC', cursive;
  font-size: clamp(2rem, 6vw, 3.5rem); /* légèrement plus petit */
  font-weight: 800;
  display: block;
  width: 100%;
  line-height: 1.1; /* ajuste l’espacement vertical */
}

/* ===== Mobile – ajuste taille automatiquement ===== */
@media screen and (max-width: 768px) {
  .carousel-text {
    padding: 0.3rem 0.6rem;
  }

  .carousel-text .line1 {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  .carousel-text .line2 {
   font-size: clamp(1.3rem, 4.5vw, 2rem); /* un peu plus petit sur smartphone */
  }
}
.carousel-logo{
  height:50px;   /* taille modifiable */
  width:auto;
}


.logo-site{
    height:60px;   /* taille modifiable */
    width:auto;
}



@media (max-width: 768px) {
  .carousel-text {
    font-size: 1.2rem;  
    padding: 0.3rem 0.6rem;
  }
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Menu principal ===== */
nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

nav li.menu {
    position: relative;
}

nav li.menu > a {
    display: block;
    padding: 1rem;
    color: white;
    font-weight: 600;
}

/* ===== Sous-menu moderne ===== */
nav li.menu ul {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    padding: 0.4rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    flex-direction: column;
    align-items: stretch;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

nav li.menu.open ul {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

nav li.menu ul li {
    width: 100%;
}

nav li.menu ul li a {
    display: block;
    width: 100%;
    padding: 0rem 1rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: left;
    box-sizing: border-box;
    transition: all 0.2s ease;
    border-radius: 6px;
}

nav li.menu ul li a:hover {
    background: #2c3e50;
    color: white;
    padding-left: 1.2rem;
}

/* Social contact */
.social-contact {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 1rem;
}

.social-contact img {
    width: 24px;
    height: 24px;
}

/* ===== Blocs info ===== */
.info-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

.contact-block, 
.calendar-block, 
.events-block {
    background-color: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex: 1 1 30%;
    min-width: 250px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;

    font-family: 'Arial', sans-serif; /* ⬅ police */
}

/* Photos */
.img-maire, .img-mairie-batiment {
    width: 90%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* ===================== CALENDRIER ===================== */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
}

.calendar-day {
    background:#e8f0f5;
    border-radius:6px;
    padding:0.2rem 0.2rem;
    min-height:41px;
    height:41px;
    font-size:0.75rem;
    position:relative;
    cursor:pointer;
    overflow:visible;
    display:flex;
    flex-direction:column;
    justify-content: flex-start;
}

.calendar-block {
    overflow: visible;
}

.calendar-day .event span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

#calendar * {
    min-width: 0;
}

.calendar-block select {
    max-width: 100%;
}

.calendar-day:hover {
    background: #d0e4f0;
    transform: scale(1.02);
    z-index: 2;
}

.calendar-block h3 {
    color: #2c3e50;
}

.calendar-day .day-number {
    font-weight: bold;
    margin-bottom: 0.1rem;
    color: #2c3e50;
}

.calendar-day.today .day-number {
    color: #2c3e50;
}

.calendar-day .events-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 22px;
}

.calendar-day .event {
    position: relative;
    background: #2c3e50;
    color: #fff;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.65rem;
    line-height: 1;
    min-height: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.calendar-day .event-popup {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    white-space: normal;
    word-wrap: break-word;
}

.calendar-day .event span.event-text {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.calendar-day .event:hover .event-popup {
    display: block;
}

.calendar-day.header-day {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #2c3e50;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    height: 30px;
    border-radius: 6px 6px 0 0;
}

.calendar-day .event.past {
    background:#888;
    color:#eee;
}

.calendar-day.today {
    background:#cce7ff;
    border:2px solid #f39c12;
}

/* ===== Événements à venir horizontaux ===== */
.events-block .event-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #fff;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    position: relative;
}

.events-block .event-preview:hover {
    transform: translateY(-2px);
}

.events-block .event-preview img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.events-block .event-preview-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.events-block .event-preview-text strong {
    font-size: 0.95rem;
    color: #2196f3;
}

.events-block .event-preview-text small {
    font-size: 0.75rem;
    color: #555;
}

.events-block .event-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.97);
    color: #333;
    padding: 0.5rem;
    border-radius: 6px;
    width: 220px;
    max-width: calc(100% - 10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    font-size: 0.75rem;
    overflow-wrap: break-word;
}

/* ===== Cars bleus ===== */
.cars-bleus {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 40px;
}


.cars-bleus .car-item {
    text-align: center;
}

.cars-bleus .car-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}


.car-text {
    margin-top: 0.5rem;
}

/* ===== Actualités ===== */
.home-section {
    margin: 2rem;
}

.news-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-item {
    background-color: white;
    flex: 1 1 30%;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.news-image img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.news-text button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #005f73;
    color: white;
    border-radius: 5px;
    transition: background 0.3s;
}

.news-text button:hover {
    background-color: #0a9396;
}

/* ===== Modals ===== */
#modal-bg {
    display: none;
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.modal-content {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
}

#modal-img {
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 12px;
}

#modal-text {
    text-align: justify;
    color: #333;
}

.modal-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.modal-btn:hover {
    background: #3b8f98;
}

.contact-btn {
    align-self: flex-start;   /* ⬅ empêche largeur 100% */
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 1rem;
    background: #3b8f98;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s ease;
}

.contact-btn:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

/* ===== Top bar ===== */
.top-bar {
    display: flex;
    align-items: center;          
    justify-content: space-between; 
    padding: 0.5rem 1rem;
    background-color: #2c3e50;
    color: #fff;
    flex-wrap: wrap;
}

.top-menu ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.top-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.top-menu ul li a:hover {
    background-color: #007f8f;
}

.contact-facebook {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-facebook .contact,
.contact-facebook .facebook {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-facebook a img {
    width: 24px;
    height: 24px;
}

/* ===== Responsive ===== */
@media screen and (max-width: 1024px) {
    .contact-block, .calendar-block, .events-block {
        flex: 1 1 100%;
    }
}

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

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .top-menu ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem 1rem;
        width: 100%;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
    }

    .top-menu ul li {
        flex: 1 1 auto;
    }

    .top-menu ul li a {
        display: block;
        text-align: center;
        padding: 0.6rem 0.8rem;
        background-color: #007f8f;
        color: #fff;
        font-weight: bold;
        border-radius: 6px;
        transition: background 0.3s, transform 0.2s;
    }

    .top-menu ul li a:hover {
        background-color: #0099a6;
        transform: translateY(-2px);
    }

    .contact-facebook {
        display: flex;
        gap: 1rem;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }

    .contact-facebook a img {
        width: 20px;
        height: 20px;
    }

    /* ===== CALENDRIER MOBILE ===== */
    .calendar-block #calendar {
        gap: 1px !important;
    }

    .calendar-block #calendar .calendar-day {
        height: 50px !important;
        min-height: 50px !important;
        font-size: 0.75rem !important;
        padding: 2px !important;
    }

    .calendar-block #calendar .calendar-day .day-number {
        font-size: 0.8rem !important;
    }

    .calendar-block #calendar .calendar-day .events-container {
        max-height: 16px !important;
        gap: 1px !important;
    }

    .calendar-block #calendar .calendar-day .event {
        font-size: 0.65rem !important;
        padding: 1px 2px !important;
    }

    .calendar-block #calendar .calendar-day.header-day {
        font-size: 0.75rem !important;
        height: 30px !important;
    }
}



.footer {
    background: linear-gradient(135deg, #4C6985, #2c3e50);
    color: white;
    padding: 1.2rem 2rem;
    font-size: 0.9rem;

    display: flex;             /* active flexbox */
    justify-content: center;   /* centre tout horizontalement */
    align-items: center;       /* centre verticalement */
    gap: 1rem;                 /* espace entre chaque élément */
    flex-wrap: wrap;           /* permet le retour à la ligne si écran petit */
    text-align: center;        /* centre le texte si ligne multiple */
}







.footer,
.footer-center a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer,
.footer-center a:hover {
    opacity: 0.7;
}

.footer .admin-link img {
    width: 18px;
    height: 18px;
}

.separator {
    opacity: 0.5;
}

@media (max-width:768px){

.home-section{
margin:1rem;
}

}

@media (max-width:768px){

.news-text button{
width:100%;
padding:0.7rem;
font-size:0.9rem;
}

}

@media screen and (max-width: 1024px) {
    .contact-block, .calendar-block, .events-block {
        flex: 1 1 100%;
    }
}

@media (max-width:768px){

.info-blocks{
gap:1.5rem;
}

}

@media (max-width: 768px) {

.info-blocks {
    flex-direction: column;
}

.contact-block,
.calendar-block,
.events-block {
    flex: 1 1 100%;
    width: 100%;
}

}

.footer-weather {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    margin-bottom: 1rem; /* espace en bas du widget */
}


.news-image{
    overflow:hidden;
}

.news-image img{
    transition: transform 0.4s ease;
}

.news-item:hover img{
    transform: scale(1.08);
}

/* ===== Effet sur les actualités ===== */

.news-item{
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover{
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}


.mairie-alert{
background:#f39c12;
color:white;
text-align:center;
padding:8px;
font-weight:600;
font-size:0.9rem;
}


.quick-links{
display:flex;
justify-content:center;
gap:1rem;
flex-wrap:wrap;
margin:30px 0;
}

.quick-links a{
background:#3b8f98;
color:white;
padding:10px 18px;
border-radius:8px;
font-weight:600;
transition:0.3s;
}

.quick-links a:hover{
background:#2c3e50;
transform:translateY(-2px);
}

#topBtn{
position:fixed;
bottom:20px;
right:20px;
background:#3b8f98;
color:white;
border:none;
border-radius:50%;
width:45px;
height:45px;
font-size:18px;
cursor:pointer;
display:none;
z-index:9999;
}

.fade-in{
opacity:0;
transform:translateY(20px);
transition:all 0.6s ease;
}

.fade-in.visible{
opacity:1;
transform:translateY(0);
}


.mairie-alert{
    background:#d9534f;
    color:white;
    font-weight:bold;
    overflow:hidden;
    white-space:nowrap;
    padding:8px 0;
    position:relative;
}

.mairie-alert-text{
    display:inline-block;
    padding-left:100%;
    animation:defilement 15s linear infinite;
}

@keyframes defilement{
    0%{
        transform:translateX(0);
    }
    100%{
        transform:translateX(-100%);
    }
}

.mairie-alert-track:hover{
    animation-play-state: paused;
}

.info-banner {
    width: 100%;
    background: #CF3C21; /* bleu mairie 10658E */
    color: white;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.5rem 0;
    box-sizing: border-box;
    position: relative;
    font-size: 0.95rem;
}

.info-text {
    display: inline-block;
    padding-left: 100%; /* commence hors écran à droite */
    animation: scroll-text 20s linear infinite;
}

@keyframes scroll-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.infos-jour {
    background:#f5f5f5;
    padding:10px;
    margin-top:10px;
    font-size:13px;
    border-radius:5px;
}
.infos-jour p {
    margin:5px 0;
}






