/*
Theme Name: Résidence Chanrion
Theme URI: https://residence-chanrion.fr
Author: Association AAMS
Author URI: mailto:aams38700@gmail.com
Description: Thème WordPress sur mesure pour la Résidence Chanrion, foyer étudiant et jeunes apprentis à Grenoble. Comprend une page de présentation complète et une page de contact pour la location de logement.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: residence-chanrion
Tags: association, education, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #2c3e50;
    background: #fdfbf6;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #e67e22; text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: #c2611a; text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    color: #2c3e50;
    line-height: 1.25;
    margin-top: 0;
}
h1 { font-size: 2.4rem; margin-bottom: .5rem; }
h2 { font-size: 1.9rem; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: .75rem; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* =========================================================
   2. HEADER & NAV
   ========================================================= */
.site-header {
    background: #ffffff;
    border-bottom: 4px solid #e67e22;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .9rem;
    padding-bottom: .9rem;
    gap: 1rem;
}
.site-branding { display: flex; align-items: center; gap: .85rem; }
.site-branding img { height: 56px; width: auto; }
.site-branding .site-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #2c3e50;
    line-height: 1.1;
}
.site-branding .site-title small {
    display: block;
    font-size: .75rem;
    color: #e67e22;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 1.5rem;
}
.main-nav a {
    color: #2c3e50;
    font-weight: 600;
    font-size: .95rem;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.main-nav a:hover, .main-nav .current-menu-item a {
    color: #e67e22;
    border-bottom-color: #e67e22;
}

.nav-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #2c3e50;
}

/* =========================================================
   3. HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: linear-gradient(rgba(44,62,80,.65), rgba(44,62,80,.55)),
                url('assets/img/hero-facade.jpg') center/cover no-repeat;
    padding: 4rem 1.25rem;
}
.hero h1 {
    color: #fff;
    font-size: 3rem;
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
    margin-bottom: .5rem;
}
.hero .tagline {
    font-size: 1.35rem;
    max-width: 720px;
    margin: 0 auto 1.75rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn {
    display: inline-block;
    padding: .85rem 1.75rem;
    background: #e67e22;
    color: #fff !important;
    font-weight: 700;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s, transform .15s;
    font-size: 1rem;
}
.btn:hover, .btn:focus { background: #c2611a; transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    color: #fff !important;
    border: 2px solid #fff;
}
.btn-outline:hover { background: #fff; color: #e67e22 !important; }

/* =========================================================
   5. SECTIONS
   ========================================================= */
section { padding: 4rem 0; }
section.alt { background: #f4ede0; }
section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}
section h2::after {
    content: '';
    display: block;
    width: 60px; height: 4px;
    background: #e67e22;
    margin: 1rem auto 0;
    border-radius: 2px;
}

.intro-text {
    max-width: 820px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.1rem;
    color: #4a5b6c;
}

/* =========================================================
   6. CARDS / FEATURES GRID
   ========================================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.card {
    background: #fff;
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    border-top: 4px solid #e67e22;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.card .icon {
    font-size: 2.2rem;
    color: #e67e22;
    margin-bottom: .5rem;
}
.card h3 { color: #2c3e50; }

/* =========================================================
   7. CONDITIONS LIST
   ========================================================= */
.conditions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}
.conditions li {
    background: #fff;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 6px;
    border-left: 4px solid #e67e22;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.conditions li::before {
    content: '✓';
    position: absolute;
    left: 1rem; top: 50%;
    transform: translateY(-50%);
    color: #e67e22;
    font-weight: 700;
    font-size: 1.3rem;
}

/* =========================================================
   8. GALERIE PHOTOS
   ========================================================= */
.gallery-section { margin-top: 2.5rem; }
.gallery-section h3 {
    color: #34495e;
    border-left: 4px solid #e67e22;
    padding-left: .75rem;
    margin-bottom: 1rem;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.gallery a, .gallery .item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    aspect-ratio: 4 / 3;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.gallery img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s;
}
.gallery a:hover img, .gallery .item:hover img { transform: scale(1.05); }
.gallery .caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    color: #fff;
    padding: 1.5rem .75rem .65rem;
    font-size: .85rem;
    font-weight: 600;
}

/* =========================================================
   9. TARIFS
   ========================================================= */
.tarifs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.tarif-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-top: 6px solid #e67e22;
}
.tarif-card.featured {
    border-top-color: #34495e;
    transform: scale(1.02);
}
.tarif-card h3 { color: #2c3e50; }
.tarif-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e67e22;
    margin: 1rem 0 .25rem;
    font-family: 'Montserrat', sans-serif;
}
.tarif-card .price small {
    font-size: .9rem;
    color: #6b7c8c;
    font-weight: 400;
    display: block;
}
.tarif-card .charges {
    color: #4a5b6c;
    font-size: .95rem;
    margin-bottom: 1rem;
}
.tarif-card ul {
    list-style: none;
    padding: 0; margin: 1.25rem 0;
    text-align: left;
}
.tarif-card ul li {
    padding: .5rem 0 .5rem 1.5rem;
    position: relative;
    border-bottom: 1px solid #f0e7d4;
}
.tarif-card ul li::before {
    content: '•';
    color: #e67e22;
    position: absolute; left: 0;
    font-size: 1.5rem;
    line-height: 1;
}

/* =========================================================
   10. FORMULAIRE DE CONTACT
   ========================================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    margin-top: 2rem;
}
.contact-info {
    background: #2c3e50;
    color: #fff;
    padding: 2rem;
    border-radius: 8px;
}
.contact-info h3 { color: #fff; }
.contact-info a { color: #f5b683; }
.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.contact-info .info-item .label {
    font-weight: 700;
    color: #e67e22;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: .15rem;
}
.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.07);
}
.contact-form .field { margin-bottom: 1.2rem; }
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
    color: #2c3e50;
    font-size: .95rem;
}
.contact-form .required { color: #e67e22; }
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: .7rem .9rem;
    border: 1.5px solid #d6cdb8;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: #fdfbf6;
    transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230,126,34,.15);
    background: #fff;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.form-feedback {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.form-feedback.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}
.form-feedback.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}
.privacy-note {
    font-size: .85rem;
    color: #6b7c8c;
    margin-top: 1rem;
}

/* =========================================================
   11. FOOTER
   ========================================================= */
.site-footer {
    background: #1f2d3d;
    color: #d3dce5;
    padding: 3rem 0 1.5rem;
    margin-top: 0;
}
.site-footer h4 {
    color: #fff;
    border-bottom: 2px solid #e67e22;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.site-footer a { color: #f5b683; }
.site-footer .legal {
    border-top: 1px solid #34495e;
    padding-top: 1.25rem;
    text-align: center;
    font-size: .85rem;
    color: #95a5b6;
}

/* =========================================================
   12. RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero .tagline { font-size: 1.05rem; }

    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
        padding: 1rem 1.5rem;
    }
    .main-nav.open { display: block; }
    .main-nav ul {
        flex-direction: column;
        gap: .75rem;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .tarif-card.featured { transform: none; }
}

/* =========================================================
   13. ACCESSIBILITY
   ========================================================= */
.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%); height: 1px; margin: -1px;
    overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
:focus-visible { outline: 3px solid #e67e22; outline-offset: 2px; }

/* WordPress core required classes */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
