/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* CONTAINER */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* HEADER */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #4a90e2, #357ABD);
    color: white;
}

/* TITRES */
h1 {
    font-size: 2.5em;
}

h2 {
    margin-bottom: 15px;
    border-left: 5px solid #4a90e2;
    padding-left: 10px;
}

/* CARDS (SECTIONS) */
.card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

/* TAILLES */
.small {
    max-width: 400px;
}

.large {
    width: 100%;
}

/* PROFIL */
#profil {
    background-color: #357ABA;
    flex: 0 0 61%;
    max-width: 61%;
}

#profil img {
    width: 120px;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* COMPETENCES */
#competences {
    flex: 0 0 35%;
    max-width: 35%;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills li {
    background: #4a90e2;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    list-style: none;
}

/* =============================================
   EXPERIENCES – FLIP CARDS
   ============================================= */

#experiences {
    max-width: 98%;
    background-color: lightblue;
}

.exp-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Carte flip */
.flip-card {
    perspective: 1000px;
    height: 210px;
    cursor: default;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-inner {
    transform: rotateY(180deg);
}

/* Face commune */
.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    padding: 18px;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* FACE AVANT */
.flip-front {
    background: #f4f8ff;
    border-left: 4px solid #4a90e2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flip-front-logo {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.flip-front-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
}

/* Carré initiales quand pas de logo */
.initiales {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #1d4ed8;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.flip-front-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-company {
    font-size: 0.8em;
    font-weight: 700;
    color: #4a90e2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flip-front h3 {
    font-size: 0.92em;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    margin: 0;
}

.flip-front .dates {
    font-size: 0.8em;
    color: #777;
    margin-top: 2px;
}

.flip-hint {
    font-size: 0.72em;
    color: #aaa;
    margin-top: auto;
}

/* FACE ARRIERE */
.flip-back {
    background: #4a90e2;
    color: white;
    transform: rotateY(180deg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flip-back h3 {
    font-size: 0.85em;
    font-weight: 700;
    color: #e0edff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    padding-bottom: 8px;
    margin: 0;
}

.flip-back ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.flip-back ul li {
    font-size: 0.82em;
    color: #d6eaff;
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

.flip-back ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.6);
    font-size: 1.1em;
    line-height: 1.2;
}

/* =============================================
   PORTFOLIO – CAROUSEL
   ============================================= */

#portfolio {
    max-width: 98%;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Carte projet */
.portfolio-item {
    border-radius: 12px;
    border: 1px solid #e0e7ef;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

/* Bandeau label */
.portfolio-label {
    font-size: 0.82em;
    font-weight: 600;
    color: white;
    background: rgba(0,0,0,0.75);
    padding: 7px 12px;
    letter-spacing: 0.3px;
}

/* Zone image */
.portfolio-img-area {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #dbeafe;
}

.portfolio-img-area .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
max-width: 250px;
}

.portfolio-img-area .slide.active {
    opacity: 1;
}

.portfolio-img-area .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dots navigation */
.portfolio-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e9eef5;
    background: #f9fafc;
}

.pdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #4a90e2;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.pdot:hover {
    transform: scale(1.2);
}

.pdot.active {
    background: #4a90e2;
}

/* CONTACT */
#contact {
    max-width: 98%;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
}

button {
    padding: 10px 20px;
    border: none;
    background: #4a90e2;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: #357ABD;
}

/* ANIMATIONS */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s;
}

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

/* RESPONSIVE */
@media (max-width: 768px) {
    .exp-container {
        grid-template-columns: 1fr;
    }

    #profil,
    #competences {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .flip-card {
        height: auto;
        min-height: 180px;
    }
}


/* =============================================
   PORTFOLIO – PATCH : centrage, zoom, couleurs
   ============================================= */

/* Zone image : centrage du contenu */
.portfolio-img-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide : centrage + overflow caché pour le zoom */
.portfolio-img-area .slide {
    max-width: 100%;          /* supprime l'ancien max-width: 250px figé */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Image : centrée + transition zoom au survol */
.portfolio-img-area .slide img {
    object-fit: contain;      /* contenu visible en entier, centré */
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow   0.35s ease;
    transform-origin: center center;
    will-change: transform;
}

.portfolio-img-area:hover .slide.active img {
    transform: scale(1.07);
}

/* ── Couleurs par type de projet (portfolio-label) ── */

/* Site internet → bleu océan */
.portfolio-item:nth-child(1) .portfolio-label {
    background: linear-gradient(90deg, #0369a1, #0ea5e9);
}
.portfolio-label-si {
    background: linear-gradient(90deg, #0369a1, #0ea5e9);
  font-size: 0.82em;
  font-weight: 600;
  color: white;
  padding: 7px 12px;
  letter-spacing: 0.3px;
}

/* Application web → violet indigo */
.portfolio-item:nth-child(2) .portfolio-label {
    background: linear-gradient(90deg, #4338ca, #818cf8);
}

/* Application mobile → vert émeraude */
.portfolio-item:nth-child(3) .portfolio-label {
    background: linear-gradient(90deg, #065f46, #10b981);
}

/*
  Si l'ordre des projets change ou si d'autres types sont ajoutés,
  vous pouvez aussi cibler par contenu de texte avec :has() (Chrome 105+) :

  .portfolio-item:has(.portfolio-label:-webkit-contains("Site internet"))  { ... }

  Ou plus universellement via une classe utilitaire ajoutée dans le HTML :
  .portfolio-label--web-site    { background: linear-gradient(...) }
  .portfolio-label--web-app     { background: linear-gradient(...) }
  .portfolio-label--mobile-app  { background: linear-gradient(...) }
*/
