/* ========================================
   FONTS
======================================== */
@font-face {
    font-family: 'DM Sans';
    src: url('../fonts/DMSans-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Zalando Sans';
    src: url('../fonts/ZalandoSansExpanded-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   VARIABLES
======================================== */
:root {
    /* Couleurs */
    --c-beige: #f9f9f5;
    --c-green: #57a934;
    --c-green-dark: #11312d;
    --c-white: #ffffff;
    --c-gray-light: #f5f5f5;
    --c-text: #212121;
    
    /* Polices */
    --font-primary: 'DM Sans', Arial, Helvetica, sans-serif;
    --font-secondary: 'Zalando Sans', Helvetica, Arial, sans-serif;
    
    /* Espacements */
    --container-width: 1280px;
    --gap: 20px;
    
    /* Radius */
    --radius: 25px;
    --radius-input: 15px;
}

/* ========================================
   RESET (Meyer simplified)
======================================== */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, 
a, strong, b, i, em, img, ul, ol, li, form, label, 
article, aside, footer, header, nav, section, 
input, textarea, select, button {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, footer, header, nav, section {
    display: block;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ========================================
   BASE
======================================== */
body {
    font-family: var(--font-primary);
    color: var(--c-text);
    line-height: 1.6;
    padding: 140px 20px 80px;
    background: var(--c-beige);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
}

strong {
    font-weight: 700;
}

h1 strong, h2 strong, h3 strong, h4 strong, h5 strong, h6 strong {
    font-weight: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

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

/* Utility */
.uppercase {
    text-transform: uppercase;
}

/* ========================================
   LAYOUT
======================================== */
.header,
.hero,
.info-box,
.form-section {
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 25px;
    font-family: var(--font-secondary);
    line-height:1;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn::after {
    content: '→';
    font-weight: 400;
}

.btn--light {
    background: var(--c-green);
    color: var(--c-green-dark);
}

.btn--light:hover {
    background: var(--c-green-dark);
    color: var(--c-green);
}

.btn--dark {
    background: var(--c-green-dark);
    color: var(--c-green);
}

.btn--dark:hover {
    background: var(--c-green);
    color: var(--c-green-dark);
}

.btn--submit {
    background: var(--c-green-dark);
    color: var(--c-green);
    border: none;
    padding: 14px 32px;
}

.btn--submit:hover {
    color: var(--c-white);
}

/* ========================================
   HEADER
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: var(--c-beige);
    padding: 40px 0;
    transition: padding 0.3s ease;
}

.header.is-scrolled {
    padding: 20px 0;
}

.header__logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 290px;
    padding: 40px 45px 40px 0;
    background: var(--c-beige);
    border-radius: 0 0 var(--radius) 0;
    transition: width 0.3s ease, padding 0.3s ease;
}

.header.is-scrolled .header__logo {
    width: 130px;
    padding: 20px 25px 20px 0;
}

.header__logo img {
    width: 100%;
    height: auto;
}

.header .btn {
    font-weight:700;
}

/* ========================================
   HERO
======================================== */
.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom:80px;
    gap:30px;
}

.hero__image {
    width: 100%;
    height: 425px;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero h1 {
    font-family: var(--font-secondary);
    color: var(--c-green-dark);
    line-height: 1.3;
    font-weight: 500;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
}

.hero h1 strong {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight:500;
}

.hero h1 sup {
    font-size: 0.5em;
}

/* ========================================
   INFO BOX - Bordure animée SVG
======================================== */
.info-box {
    position: relative;
    margin: 30px auto;
    padding: 30px;
}

.info-box__border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.info-box__leaves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

.info-box__leaves svg {
    display: block;
    position: absolute;
    transform-origin: bottom right;
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.info-box__leaves svg.leaf-1 {
    top: -20px;
    left: 25px;
    height: 20px;
    width: auto;
    transform: scale(0);
}

.info-box__leaves svg.leaf-2 {
    top: -20px;
    left: 30px;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-0.8, 0.8);
}

.info-box__leaves svg.leaf-3 {
    top: -20px;
    left: 45%;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-0.8, 0.8);
}

.info-box__leaves svg.leaf-4 {
    top: -20px;
    left: 90%;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-0.8, -0.8);
}

.info-box__leaves svg.leaf-5 {
    top: calc(100% - 20px);
    left: 95%;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-1, -1);
}

.info-box__leaves svg.leaf-6 {
    top: calc(100% - 20px);
    left: calc(95% - 3px);
    height: 20px;
    width: auto;
    transform: scale(0) scale(0.5, -0.5);
}

.info-box__leaves svg.leaf-7 {
    top: calc(100% - 20px);
    left: 60%;
    height: 20px;
    width: auto;
    transform: scale(0);
}

.info-box__leaves svg.leaf-8 {
    top: calc(100% - 20px);
    left: 30%;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-1, -1);
}

.info-box__leaves svg.leaf-9 {
    top: calc(100% - 20px);
    left: calc(30% - 3px);
    height: 20px;
    width: auto;
    transform: scale(0) scale(0.5, -0.5);
}

.info-box__leaves svg.leaf-10 {
    top: calc(100% - 20px);
    left: 25px;
    height: 20px;
    width: auto;
    transform: scale(0) scale(-0.5, -0.5);
}

.info-box.is-visible .info-box__leaves svg.leaf-1 {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.8s;
}

.info-box.is-visible .info-box__leaves svg.leaf-2 {
    opacity: 1;
    transform: scale(-0.8, 0.8);
    transition-delay: 1.1s;
}

.info-box.is-visible .info-box__leaves svg.leaf-3 {
    opacity: 1;
    transform: scale(-0.8, 0.8);
    transition-delay: 1.4s;
}

.info-box.is-visible .info-box__leaves svg.leaf-4 {
    opacity: 1;
    transform: scale(-0.8, -0.8);
    transition-delay: 1.7s;
}

.info-box.is-visible .info-box__leaves svg.leaf-5 {
    opacity: 1;
    transform: scale(-1, -1);
    transition-delay: 2.0s;
}

.info-box.is-visible .info-box__leaves svg.leaf-6 {
    opacity: 1;
    transform: scale(0.5, -0.5);
    transition-delay: 2.3s;
}

.info-box.is-visible .info-box__leaves svg.leaf-7 {
    opacity: 1;
    transform: scale(1);
    transition-delay: 2.6s;
}

.info-box.is-visible .info-box__leaves svg.leaf-8 {
    opacity: 1;
    transform: scale(-1, -1);
    transition-delay: 2.9s;
}

.info-box.is-visible .info-box__leaves svg.leaf-9 {
    opacity: 1;
    transform: scale(0.5, -0.5);
    transition-delay: 3.2s;
}

.info-box.is-visible .info-box__leaves svg.leaf-10 {
    opacity: 1;
    transform: scale(0.5, -0.5);
    transition-delay: 3.5s;
}

.info-box__content p {
    margin-bottom: 15px;
    font-size: 0.9375rem;
}

.info-box__content p:last-child {
    margin-bottom: 0;
}

.info-box__content strong {
    color: var(--c-green-dark);
}

/* ========================================
   FORM SECTION
======================================== */
.form-section {
    text-align: center;
    padding-top: 40px;
    padding-bottom: 60px;
}

.form-section h2 {
    font-family: var(--font-secondary);
    font-size: clamp(1.375rem, 3vw, 2.1875rem);
    color: var(--c-green-dark);
    margin-bottom: 30px;
    line-height: 1.3;
}

.form-wrapper {
    background: var(--c-green);
    border-radius: var(--radius);
    padding: 40px 40px 20px;
    text-align: left;
}

.form-wrapper h3 {
    color: var(--c-green-dark);
    font-size: 1.5625rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

/* ========================================
   FORM FIELDS
======================================== */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.checkField {
    width: 100%;
}

.checkField.half {
    width: calc(50% - 15px);
}

.checkField.full {
    width: 100%;
}

.checkField input[type="text"],
.checkField input[type="email"],
.checkField select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--c-green-dark);
    border-radius: var(--radius-input);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    background: transparent;
    color: var(--c-white);
    transition: border-color 0.3s ease;
}

.checkField input[type="text"]:focus,
.checkField input[type="email"]:focus,
.checkField select:focus,
.checkField textarea:focus {
    outline: none;
}

.checkField input::placeholder,
.checkField textarea::placeholder {
    color: var(--c-white);
}

.checkField label {
    display: block;
    color: var(--c-green-dark);
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.checkField.full label {
    font-weight: 700;
    font-size: 1.25rem;
}

.checkField textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border: 2px solid var(--c-green-dark);
    border-radius: var(--radius-input);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    resize: vertical;
    background: transparent;
    color: var(--c-white);
}

.checkField select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
    color: var(--c-white);
}

/* RGPD Field */
.rgpd-field {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.rgpd-field input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: var(--c-green);
    border: 2px solid var(--c-green-dark);
    border-radius: 4px;
    cursor: pointer;
    margin-top: 2px;
    position: relative;
}

.rgpd-field input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--c-white);
    font-size: 1rem;
    font-weight: 700;
}

.rgpd-field label {
    width:calc(100% - 50px);
    margin-bottom: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--c-white);
}

/* Submit */
.form-submit {
    width: 100%;
    text-align: center;
    transform: translateY(85%);
}

.ciyah{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    align-content:center;
}

/* ========================================
   MEDIA QUERIES
======================================== */
@media (max-width: 1024px) {
    .hero__image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --gap: 15px;
    }
    
    body {
        padding: 80px 20px 0;
    }
    
    .header {
        padding: 20px;
    }
    
    .header__logo {
        width: 150px;
        padding: 20px 25px 20px 0;
        left: 20px;
    }
    
    .header .btn {
        margin-top: 15px;
        font-size: 0.75rem;
    }
    
    .hero__image {
        height: 220px;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .info-box {
        padding: 20px;
    }
    
    .form-wrapper {
        padding: 25px 20px;
    }
    
    .checkField.half {
        width: 100%;
    }
    
    .rgpd-field {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .btn {
        font-size:0.9rem;
    }
    
    .form-wrapper h3 {
        font-size: 1rem;
    }
    
    .checkField input[type="text"],
    .checkField input[type="email"],
    .checkField select,
    .checkField textarea {
        padding: 12px 14px;
        font-size: 1rem; /* Évite zoom iOS */
    }
}

