/* ========================================
   RESPONSIVE.CSS - VERSION FINALE CORRIGÉE
   Site Respi-Liège
   ======================================== */

/* ========================================
   BASE RESPONSIVE
   ======================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* Container principal */
#container {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

/* Contenu principal */
#corps {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

#contenu {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Pied de page */
#piedpage {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* ========================================
   IMAGES RESPONSIVE
   ======================================== */

img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Images dans accordéon */
.accordion-content img {
    max-width: 100% !important;
    height: auto !important;
}

@media screen and (max-width: 600px) {
    .accordion-content img {
        float: none !important;
        display: block !important;
        margin: 0 auto 12px !important;
        max-width: 75% !important;
    }
}

/* ========================================
   FORMULAIRES RESPONSIVE (RDV.PHP)
   ======================================== */

/* Tables de formulaire */
form table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

form table td {
    padding: 8px 5px !important;
    vertical-align: top;
}

/* Inputs et selects */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form select,
form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    font-size: 16px !important; /* Empêche zoom iOS */
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-family: Arial, sans-serif !important;
}

/* Textarea spécifique */
form textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

/* Bouton submit */
form input[type="submit"] {
    width: auto !important;
    min-width: 150px !important;
    padding: 12px 40px !important;
    font-size: 16px !important;
    cursor: pointer;
    display: block !important;
    margin: 10px auto !important;
}

/* Checkbox RGPD */
form input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
}

/* reCAPTCHA */
.g-recaptcha {
    transform: scale(1);
    transform-origin: 0 0;
}

@media screen and (max-width: 600px) {
    /* Formulaire mobile */
    form table {
        display: block;
    }
    
    form table tbody,
    form table tr,
    form table td {
        display: block;
        width: 100% !important;
    }
    
    form table td:first-child {
        font-weight: bold;
        margin-top: 15px;
        margin-bottom: 5px;
    }
    
    /* reCAPTCHA responsive */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
        margin-bottom: 10px;
    }
    
    /* Bouton submit pleine largeur */
    form input[type="submit"] {
        width: 100% !important;
        padding: 15px !important;
    }
}

@media screen and (max-width: 350px) {
    .g-recaptcha {
        transform: scale(0.75);
    }
}

/* ========================================
   TABLES GÉNÉRIQUES (ACCORDÉON)
   ======================================== */

.accordion-content table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 14px;
}

.accordion-content table td,
.accordion-content table th {
    padding: 8px !important;
    word-wrap: break-word;
}

@media screen and (max-width: 600px) {
    .accordion-content table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }
    
    .accordion-content table td,
    .accordion-content table th {
        padding: 5px !important;
    }
}

/* ========================================
   TEXTE RESPONSIVE
   ======================================== */

p, li {
    line-height: 1.6;
    word-wrap: break-word;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

@media screen and (max-width: 600px) {
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    h4 { font-size: 14px; }
    p, li { font-size: 14px; }
}

/* ========================================
   MEDIA QUERIES - TABLETTES
   ======================================== */

@media screen and (max-width: 800px) {
    #container,
    #corps,
    #contenu,
    #piedpage {
        padding: 0 12px !important;
    }
}

/* ========================================
   MEDIA QUERIES - MOBILE
   ======================================== */

@media screen and (max-width: 600px) {
    #container,
    #corps,
    #contenu,
    #piedpage {
        padding: 0 10px !important;
    }
}

/* ========================================
   MEDIA QUERIES - PORTRAIT ÉTROIT
   ======================================== */

@media screen and (max-width: 400px) {
    #container,
    #corps,
    #contenu,
    #piedpage {
        padding: 0 8px !important;
    }
}

/* ========================================
   MEDIA QUERIES - TRÈS PETIT ÉCRAN
   ======================================== */

@media screen and (max-width: 350px) {
    #container,
    #corps,
    #contenu,
    #piedpage {
        padding: 0 5px !important;
    }
    
    body {
        font-size: 12px;
    }
}

/* ========================================
   UTILITAIRES
   ======================================== */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
/* ========================================
   PIED DE PAGE RESPONSIVE
   ======================================== */

#pied {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

#pied p {
    margin: 10px 0 !important;
    word-wrap: break-word !important;
    line-height: 1.6 !important;
}

#pied small {
    font-size: 12px !important;
    display: block;
}

#pied a {
    display: inline-block;
    padding: 5px 8px;
    word-break: break-word;
}

@media screen and (max-width: 600px) {
    #pied {
        padding: 12px 8px !important;
    }
    
    #pied small {
        font-size: 11px !important;
    }
    
    #pied a {
        display: block;
        margin: 5px 0;
        padding: 8px 0;
    }
    
    /* Sépare les liens verticalement sur mobile */
    #pied br {
        display: none;
    }
}

@media screen and (max-width: 400px) {
    #pied {
        padding: 10px 5px !important;
    }
    
    #pied small {
        font-size: 10px !important;
    }
}
/* ========================================
   MENU PRINCIPAL RESPONSIVE
   ======================================== */

@media screen and (max-width: 800px) {
    #menu-principal {
        width: 100% !important;
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
    }

    #menu-principal a {
        margin-bottom: 8px;
    }
}

@media screen and (max-width: 500px) {
    #menu-principal {
        flex-direction: column;
        align-items: center;
    }
}

/* ========================================
   FIN RESPONSIVE.CSS
   ======================================== */
